<template>
<uni-shadow-root class="partials-form_item-form_item_two-index"><template name="form_item_two">
<block>
<view class="form_commit_item_info" :data-belongformtype="formCommitItem.belongFormType" @click.stop.prevent="checkFormDetail" :data-id="formCommitItem.id">
  <view class="top_part">
    <view class="top_part_left">
      <image class="top_part_left_img" :src="formCommitItem.commitPlatformUserIcon?formCommitItem.commitPlatformUserIcon+"?x-oss-process=style/preview_120":""" :data-link="'chat_room.html?puid='+(formCommitItem.commitPlatformUserId)+'&puname='+(formCommitItem.commitPlatformUserName)" @click.stop.prevent="tolinkUrl"></image>
      <view class="user_base_info">
        <text class="user_base_info_name" :data-link="'chat_room.html?puid='+(formCommitItem.commitPlatformUserId)+'&puname='+(formCommitItem.commitPlatformUserName)" @click.stop.prevent="tolinkUrl">{{formCommitItem.commitPlatformUserName}}</text>
        <view class="user_base_info_type">
          <text class="user_base_info_type_name" :style="'background:'+(setting.platformSetting.defaultColor)">{{formCommitItem.belongFormName}}</text>
          <view class="form_reward_status" v-if="controlLimitState">
            <text class="form_reward_status_item" :style="'background:'+(setting.platformSetting.defaultColor)" v-if="formCommitItem.recordStatus==1">有效表单</text>
            <text class="form_reward_status_item" style="background:#999" v-if="formCommitItem.recordStatus==2">无效表单</text>
            <text class="form_reward_status_item" style="background:#999" v-if="formCommitItem.recordStatus==0">待审核表单</text>
          </view>
        </view>
      </view>
    </view>
    <view class="top_part_right" v-if="controlLimitState">
      <image class="more_icon" v-if="(!formCommitItem.showFunState)" @click.stop.prevent="showMoreFun" data-type="show" src="https://image1.sansancloud.com/xianhua/2019_5/30/19/48/32_954.jpg?x-oss-process=style/preview_120"></image>
      <image class="more_icon" v-else @click.stop.prevent="showMoreFun" data-type="hidden" src="https://image1.sansancloud.com/xianhua/2019_5/30/20/22/55_904.jpg?x-oss-process=style/preview_120"></image>
      <view class="fun_list" v-if="formCommitItem.showFunState">
        <view class="fun_item" @click.stop.prevent="replyTextStateFun" data-type="show">
          <image class="fun_item_icon" src="https://image1.sansancloud.com/xianhua/2019_5/30/19/57/40_527.jpg?x-oss-process=style/preview_120"></image>
          <text style="letter-spacing:22rpx;">回复</text>
        </view>
        <view class="fun_item" @click.stop.prevent="setStateFun" data-commitStatus="1" v-if="formCommitItem.recordStatus==0">
          <image class="fun_item_icon" src="https://image1.sansancloud.com/xianhua/2019_5/30/19/57/40_519.jpg?x-oss-process=style/preview_120"></image>
          <text>置有效</text>
        </view>
        <view class="fun_item" @click.stop.prevent="setStateFun" data-commitStatus="2" v-if="formCommitItem.recordStatus==0">
          <image class="fun_item_icon" src="https://image1.sansancloud.com/xianhua/2019_5/30/19/57/40_557.jpg?x-oss-process=style/preview_120"></image>
          <text>置无效</text>
        </view>
      </view>
    </view>
  </view>
  <view class="center_part">
    <view v-for="(itemData,idx) in (formCommitItem.commitArr)" :key="itemData.id" class="center_part_item" v-if="itemData.type!=11&&itemData.type!=7&&idx<=formCommitItem.showNum&&itemData.showInList==1">
      <text class="center_part_item_title" v-if="itemData.type!=9">{{itemData.title}}</text>
      <text class="interval" v-if="itemData.type!=9">:</text>
      <rich-text class="center_part_item_value" v-if="itemData.type!=12" :nodes="itemData.value"></rich-text>
      
      <text class="center_part_item_value" v-if="itemData.type==12">{{itemData.value.value}}</text>
      <view class="more" v-if="formCommitItem.lengthStr>3&&idx==formCommitItem.showNum-2&&formCommitItem.showMoreState">
        <image class="showMore" :data-index="idx" data-type="hidden" @click.stop.prevent="showMore" src="https://image1.sansancloud.com/xianhua/2019_3/20/11/1/46_412.jpg?x-oss-process=style/preview_120"></image>
      </view>
      <view class="more" v-if="formCommitItem.lengthStr>=3&&idx==formCommitItem.showNum&&!formCommitItem.showMoreState">
        <image class="showMore" :data-index="idx" :data-length="formCommitItem.lengthStr" data-type="show" @click.stop.prevent="showMore" src="https://image1.sansancloud.com/xianhua/2019_3/20/11/1/46_428.jpg?x-oss-process=style/preview_120"></image>
      </view>
    </view>
    <view v-for="(itemData,index) in (formCommitItem.commitArr)" :key="itemData.id" class="show_img" v-if="itemData.type==7&&itemData.value">
      <image v-for="(img,index) in (itemData.value)" :key="img.index" class="show_img_item" mode="aspectFill" :src="img" v-if="publicFun.typeOf(itemData.value)!='string'"></image>
      <image class="show_img_item" mode="aspectFill" :src="itemData.value" v-if="publicFun.typeOf(itemData.value)=='string'"></image>
    </view>
    <view v-for="(itemData,index) in (formCommitItem.commitArr)" :key="itemData.id" class="show_img" v-if="itemData.type==11&&itemData.value">
      <image v-for="(img,index) in (itemData.value)" :key="img.index" class="show_img_item" mode="aspectFill" :src="img"></image>
    </view>
    <view class="addr_time">
      <view class="addr_con">
      </view>
      <text class="time_con">{{formCommitItem.commitDate}}</text>
    </view>
  </view>
  <view class="reply_block" v-if="formCommitItem.reply">
      
    <text style="width:18%;white-space:nowrap;">回复内容：</text>
    <text>「"{{formCommitItem.reply}}"」</text>
  </view>
</view>
<view class="zhezhao" v-if="formCommitItem.showFunBan"></view>
<view class="reply_popup" v-if="formCommitItem.showFunBan">
  <text class="reply_popup_title">回复表单</text>
   <textarea class="reply_text" name="content" maxlength="200" placeholder="请写下您的意见..." value @input="bindTextAreaBlur"></textarea>
   <view class="reply_popup_fun">
     <view class="reply_popup_fun_btn" @click.stop.prevent="replyTextStateFun" data-type="hidden">
       <text>取消</text>
     </view>
     <view class="reply_popup_fun_btn" @click.stop.prevent="replyTextData">
       <text>回复</text>
     </view>
   </view>
</view>
</block>
</template></uni-shadow-root>
</template>
<wxs src="../../../public/publicFun.wxs" module="publicFun"></wxs>
<script>

global['__wxRoute'] = 'partials/form_item/form_item_two/index'

Component({})

export default global['__wxComponents']['partials/form_item/form_item_two/index']
</script>
<style platform="mp-weixin">
.form_commit_item_info{
  display: flex;
  flex-direction: column;
  margin: 16rpx;
  box-shadow: 2rpx 4rpx 10rpx #ccc;
  width: 96%;
  box-sizing: border-box;
  border-radius: 10rpx;
  background: #fff;
}
.top_part{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 20rpx 30rpx;
}
.top_part_left{
  display: flex;
  flex-direction: row;
  align-items: center;
}
.top_part_left_img{
  width: 100rpx;
  height: 100rpx;
  margin-right: 20rpx;
  border-radius: 100rpx;
}
.user_base_info{
  display: flex;
  flex-direction: column;
  height: 80rpx;
  justify-content: space-between;
}
.user_base_info_name{
  font-size: 26rpx;
}
.user_base_info_type{
  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 22rpx;
}
.user_base_info_type_name{
  text-align: center;
  color: #fff;
  line-height: 30rpx;
  height: 30rpx;
  padding:2rpx 10rpx;
  background: #FED201;
  margin-right: 10rpx;
  border-radius: 6rpx;
}
.user_base_info_type_num{
  text-align: center;
  line-height: 30rpx;
  height: 30rpx;
  padding:2rpx 10rpx;
  background: #FED201;
  border-radius: 6rpx;
  color:#666;
}
.top_part_right{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  font-size: 26rpx;
  color: #999;
  position: relative;
}
.more_icon{
  width: 40rpx;
  height: 40rpx;
  margin-left: 10rpx;
  padding:20rpx;

}
/* center */
.center_part{
  display: flex;
  flex-direction: column;
  font-size: 26rpx;
  color: #888;
  padding-right:80rpx;
  padding-left:30rpx;
}
.center_part_item{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  margin-bottom: 10rpx;
  position: relative;
}
.interval{
  margin: 0 10rpx 0 4rpx;
}
.showMore{
  position: absolute;
  right: -60rpx;
  top: -10rpx;
  width: 30rpx;
  height: 30rpx;
  padding:20rpx;
}
.show_img{
  display: flex;
  position: relative;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: center;
  margin-bottom: 15rpx
}
.more{
  position: absolute;
  top: 0;
  right: 0;
}
.show_img_item{
  width: 180rpx;
  height: 180rpx;
  margin: 10rpx;
}
.addr_time{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom:15rpx;
}
.addr_con{
  display: flex;
  flex-direction: row;
  align-items: center;
}
.addr_con_icon{
  width: 30rpx;
  height: 30rpx;
  margin-right: 6rpx;
}
.time_con{
  color: #ccc
}
/* bottom */
.bottom_part{
  display: flex;
  flex-direction: row;
  align-items: center;
  border-top: 1rpx solid #eee;
  padding: 20rpx 30rpx;
}
.bottom_part_item{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-right: 30rpx;
  font-size: 24rpx;
  color: #888
}
.bottom_part_item_icon{
  width: 32rpx;
  height: 32rpx;
  margin-right: 4rpx;
}
.publish_message_btn{
  position: fixed;
  bottom: 0rpx;
  height: 100rpx;
  color: #fff;
  font-size: 30rpx;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%
}
.publish_message_icon{
  width: 34rpx;
  height: 34rpx;
  margin-right: 10rpx;
}
/*功能块  */
.function_block{
  display: flex;
  flex-direction: row;
  align-items: center;
  border-top: 1rpx solid #eee;
  padding: 20rpx 30rpx;
}
.fun_list{
  width:136rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  top:10rpx;
  left: -160rpx;
  background: #eee;
  padding:10rpx 16rpx;
  border-radius: 10rpx;
  z-index: 2
}
.fun_item{
  display: flex;
  align-items: center;
  flex-direction: row;
  font-size: 24rpx;
  color: #8a8a8a;
  width: 100%;
  padding:10rpx;
}
.fun_item_icon{
  width: 30rpx;
  height: 30rpx;
  margin-right: 18rpx;
}
.form_reward_status{
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  font-size: 24rpx;
  color: #fff;
}
.form_reward_status_item{
  padding:2rpx 10rpx;
  margin-left:10rpx;
  border-radius:6rpx;
}
.zhezhao {
  position:fixed;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:#000;
  opacity:0.6;
  z-index:99;
}
.reply_popup{
  position: fixed;
  top: 50%;
  left: 50%;
  width: 600rpx;
  height: 460rpx;
  margin-top: -400rpx;
  margin-left: -300rpx;
  background: #fff;
  border-radius: 20rpx;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.reply_popup_title{
  border-bottom: 1rpx solid #ccc;
  padding: 16rpx 20rpx;
  font-size: 28rpx;
  color: #999;
  box-sizing:border-box;
  width: 100%
}
.reply_text{
  border: 1rpx solid #ddd;
  border-radius: 10rpx;
  padding: 20rpx;
  margin: 20rpx;
  box-sizing: border-box;
  font-size: 24rpx
}
.reply_popup_fun{
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  margin-top: 10rpx
}
.reply_popup_fun_btn{
  width: 50%;
  border-right: 1rpx solid#eee;
  font-size: 26rpx;
  color: #999;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.reply_block{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  border-top: 1rpx solid #eee;
  padding: 20rpx 30rpx;
  color: #999;
  font-size: 26rpx;
}
</style>